Skip to content

docs(spec,objectql): SharedRecordIds and fixed-read leaf seam docblocks describe the share arm after the switch - #36723

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-36121-shared-record-ids-docblock-tense
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-36121-shared-record-ids-docblock-tense

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #36121

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感;只改了两处源码注释,让它们和第 6 步切换后的实际行为一致。
  • 为什么做:属于「共享授权不再有 5000 条上限」那个系列的收尾,旧注释仍说名单最多 5000 条、仍说还没有生产者。
  • 出错会怎样:只是注释,不改任何代码或行为;写错了也只是误导读注释的人,随时可撤回。
  • 要你做的:无。

What changes

Comment-only, in two files. Each sentence below was false on origin/main (3aa008d) after the ADR-0155 step-6 switch (plugin-sharing's buildReadFilter / buildWriteFilter now push SharedRecordIds.read / .write at sharing-service.ts:828 and :948; share-arm-boot.ts holds the class-2 boot check; shareGrantsInertReason calls driverEvaluatesFixedReadLeaf at sharing-service.ts:1763).

packages/spec/src/data/shared-record-ids.ts

line before after
9 It sits where today's list of granted ids sits It sits where the share arm's list of granted ids sat before the producer's switch (ADR-0155 plan step 6)
21-23 The list the share arm binds today holds at most 5,000 members of G; the leaf is G at every count. The list the share arm bound before the switch is retired; the share arm now carries this leaf, which is G at every count.
72 where today's recipient_id comes from where the retired list's recipient_id came from
102-104 No caller of the comparand-shape door admits it until the engine's card (ADR-0155 plan step 2), and nothing writes it until that producer's switch (plan step 6). The engine's callers of the comparand-shape door admit it (ADR-0155 plan step 2), and that producer writes it from its switch on (plan step 6).

packages/objectql/src/fixed-read-leaf-seam.ts

line before after
57-59 the class-② boot check and R2's share-arm answer land with the producer (ADR-0155 plan step 6), and until then nothing on main writes the leaf. the class-② boot check and R2's share-arm answer live with the producer, plugin-sharing (ADR-0155 plan step 6), which is the one writer of the leaf.
85-86 the seam's consult now, and the producer's up-front answer (R2) when it lands (ADR-0155 plan step 6) the seam's consult, and the producer's up-front answer (R2, ADR-0155 plan step 6)
121 which today's read of the table runs and the subquery would read around which the retired list's read of the table ran and the subquery would read around

Kept, because still true at main: seam line 5, "SharedRecordIds today, ADR-0147's leaf on the card that adds it" (FIXED_READ_LEAF_NAMES is still ['SharedRecordIds']), and "with no cap and no ordering" (ADR-0155 ① ruled A, restated unchanged). The corrected prose describes the 5,000 cap only as retired, never as live.

The card's git grep -n "5,000\|5000" -- packages/spec/src/data packages/objectql/src hits one grant-list line (shared-record-ids.ts:22, fixed here). The other hits are unrelated: autonumber seed page size (engine-top-level.ts, engine-defaults-and-autonumbers.ts), MIN_MAX_EXCLUDED_ID_BUDGET, timeouts and test fixtures. Left alone.

Two patch changesets, one per touched published package (@objectstack/spec, @objectstack/objectql), because the docblocks ship in the published bytes.

Tests

No behaviour changes, so there is no new test and no ablation.

Acceptance notes

  • packages/plugins/plugin-sharing/src/share-arm-boot.ts:10 still says "today's grant read" about the retired list read. It is outside this card's file surface (not under the card's grep roots), so it is left for a later pass.

Verification

Two-minute check: git diff origin/main -- packages/spec/src/data/shared-record-ids.ts packages/objectql/src/fixed-read-leaf-seam.ts shows only lines inside block comments, and grep -n "today\|until" packages/spec/src/data/shared-record-ids.ts no longer finds the list or the producer described as live.

Files to read first: packages/spec/src/data/shared-record-ids.ts (the 5,000 sentence, lines 21-23).

Local gates at d42859d
  • Build: pnpm --filter '@objectstack/objectql^...' --filter @objectstack/objectql build under os-verify-lock: VERDICT command-exit 0.
  • pnpm --filter @objectstack/spec typecheck and pnpm --filter @objectstack/objectql typecheck: both passed (the lock command's later vitest leg named a wrong path; rerun below).
  • vitest run src/data/shared-record-ids.test.ts (spec): Test Files 1 passed, Tests 32 passed. vitest run src/engine-fixed-read-leaf-seam.test.ts (objectql): Test Files 1 passed, Tests 70 passed.
  • dispatch-gates --commands: 81 families derived; 79 exit 0, 2 exit 3 (NOT MEASURED): check-plugin-teardown-shape.mjs --self-test (shallow clone cannot reach its pinned control commit) and check:dual-build-cjs-loads (needs a full workspace build). Both run in CI.
  • --ran reconciliation: 81 derived, 79 run, 2 NOT-MEASURED, 0 UNRUN.
  • Spec dist gates rerun after the build: check:api-surface, check:exported-any, check:docs, check:authorable-surface all exit 0. check-nul-bytes: exit 0.
  • test:repo not run locally (no repo-project test touched); CI Test Core covers it.

Generated by Claude Code

…ks describe the share arm after the switch

The share arm's capped list of granted ids is retired (ADR-0155 step 6);
the docblocks no longer describe it, or the missing producer, in the
present tense. Comment-only.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation protocol:data tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 2 changed file(s) yielded no anchor (packages/objectql/src/fixed-read-leaf-seam.ts, packages/spec/src/data/shared-record-ids.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 2 changed package(s)).

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/objectql/src/fixed-read-leaf-seam.ts, packages/spec/src/data/shared-record-ids.ts) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e343ab7c209c858ee5a7a1fa117baacf96a77229 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head d42859d · 2026-11-23T14:22Z

L1-a review thread runs the schema-face contract review at CONTRACT_REVIEW_TIER on this head, in parallel with its L1.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d42859d0567775ea9f16cd5ab16fc76afc67a06e
Local-runs: none
Scope: packages/spec/src/data/shared-record-ids.ts + packages/objectql/src/fixed-read-leaf-seam.ts

Inputs read: card #36121 (body and its three comments: triage 7065140496, claim 7099712845, dev report 7103837295), PR #36723 (body, four-file list, net diff against main; merge base 3aa008d, and neither reviewed file nor packages/plugins/plugin-sharing changed on main since), and the check-runs on this head. Code read in the tree at this head, never reviewed: packages/plugins/plugin-sharing/src/sharing-service.ts, packages/plugins/plugin-sharing/src/share-arm-boot.ts, packages/objectql/src/filter-comparand-shape.ts, packages/objectql/src/index.ts, packages/spec/src/data/fixed-read-leaf.ts, packages/spec/src/contracts/data-engine.ts, packages/spec/src/contracts/sharing-service.ts, ADR-0155's plan, and sharing-service.ts as it stood on the parent of #36116's merge commit (52a2398) for the sentences about the retired list.

① Derived judgments

  • Accept-set: unchanged, right. Every hunk in both .ts files sits inside a block comment; no schema, type, export, operator or runtime line moves. SharedRecordIds, isSharedRecordIds, SHARED_RECORD_IDS_BRAND, driverEvaluatesFixedReadLeaf and fixedReadLeafClassOfEngine keep their signatures.
  • Public surface: the published bytes that change are TSDoc only (the module docblock of @objectstack/spec/data's shared-record-ids.ts; the module docblock and two symbol docblocks of @objectstack/objectql's seam, one of them on the exported driverEvaluatesFixedReadLeaf). No api-surface or export-origins baseline is owed and none is in the diff, right.
  • Gate verdicts on this head at read time: Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Lint · ESLint, Lint · repo & tooling gates, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Type Check · source gates, Check PR Size and Flag docs affected by code changes are completed with success. Still in progress and NOT cited as green: Build Core, Build UI Deps, Test Core (all ten shards), Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Lint · docs & code guards, Lint · CI, release & engine gates, Lint · scoped · slot lookup & corpus, Lint · scoped · query-options erasure, Live E2E UI. This record attests the contract reading only; those runs remain the merge gate's to answer.

② Semver level

Two patch changesets, one per touched published package (@objectstack/spec, @objectstack/objectql): right. The diff publishes changed docblock bytes and nothing else, so patch is the level, and a changeset is owed because the TSDoc ships. Both changeset bodies describe the tree truthfully (plugin-sharing's read and write scopes carry the leaf; plugin-sharing reads driverEvaluatesFixedReadLeaf for R2).

Clause-②: no — right. No accept-set narrows or widens; Metadata-protocol: none is right for the same reason. The line is on the PR body and on both changesets, and it matches the claim.

③ Boundary flags

  • open_questions: empty in the dev report; nothing to answer.
  • Dev out-of-scope note, packages/plugins/plugin-sharing/src/share-arm-boot.ts:10 ("today's grant read ran that registration"): confirmed in the tree, and confirmed outside this card's surface (the card names the two files and the grep roots packages/spec/src/data and packages/objectql/src). Leaving it is right for this PR. It is recorded as "noted, not filed"; the adopting seat owes it a carrier (a follow-up card or a fold into the next plugin-sharing prose pass), since no carrier exists today.
  • The card's grep, re-read on this head: under the two roots the only grant-list hit was shared-record-ids.ts:22, rewritten here. The remaining hits (autonumber seed page size, MIN_MAX_EXCLUDED_ID_BUDGET, timeouts, issue numbers, examples) are unrelated, as the dev says.
  • Dev deviations (trailer and footer form): process matters for the lane seat, no contract effect.
  • SQL push-down: no code changes, so no new id materialisation and no in-app join. The prose now states the push-down that is live (the leaf compiled as a subquery in the list's position; no grant read into memory).

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/data/shared-record-ids.ts — each changed sentence against the tree:

  • "It sits where the share arm's list of granted ids sat before the producer's switch (ADR-0155 plan step 6), as the comparand of $in on the object's id" — true. Before fix(plugin-sharing)!: every share grant counts; the sharing scopes carry the share-grant leaf instead of a list capped at 5,000 (ADR-0155 step 6) #36116, buildReadFilter and buildWriteFilter pushed the granted-id list as the $in comparand of id; on this head sharing-service.ts:828 and :948 push SharedRecordIds.read / .write in that same disjunct position. Plan step 6 in ADR-0155 is "plugin-sharing: the switch".
  • "The list the share arm bound before the switch is retired; the share arm now carries this leaf, which is G at every count" — true. grantedRecordIds and both limit: 5000 grant reads are gone from sharing-service.ts on this head; no list fallback exists (the seam's own rule). The removed claim, "holds at most 5,000 members of G", was false after the switch. Where R2 applies the producer writes no share arm at all (shareGrantsInertReason), which the sentence does not contradict: an arm, where there is one, is the leaf. contracts/sharing-service.ts already says the same in the published contract.
  • "where the retired list's recipient_id came from" — true. The retired reads filtered recipient_id: context.userId; the leaf is built from context.userId of the same context.
  • "The engine's callers of the comparand-shape door admit it (ADR-0155 plan step 2), and that producer writes it from its switch on (plan step 6)" — true. objectql/src/filter-comparand-shape.ts#assertListComparandShapes passes admitFixedReadLeaves: ENGINE_FIXED_READ_LEAF_BRANDS on every call, and every engine verb reaches the door through it. The only non-test writes of the leaf into a filter are the two plugin-sharing builders; the two other constructions (share-arm-boot.ts:82, sharing-service.ts:1747) are probes handed to no evaluator, so the unchanged "One producer writes it" still holds. Both removed "until" clauses were false on main.
  • Sentences kept and still true: "with no cap and no ordering" (① ruled A); the SQL shape; the legality section.

packages/objectql/src/fixed-read-leaf-seam.ts — each changed sentence against the tree:

  • "the class-② boot check and R2's share-arm answer live with the producer, plugin-sharing (ADR-0155 plan step 6), which is the one writer of the leaf" — true. The boot check is share-arm-boot.ts#shareGrantRegistrationRefusal; R2's answer is SharingService.shareGrantsInertReason; the seam module still holds neither. FIXED_READ_LEAF_NAMES is ['SharedRecordIds'], so "the leaf" has one writer.
  • "The one reader of the declaration: the seam's consult, and the producer's up-front answer (R2, ADR-0155 plan step 6), which reaches the driver through IDataEngine.getDriverForObject" — true. supports.fixedReadLeaves is read only inside driverEvaluatesFixedReadLeaf, called at the seam (passFixedReadLeaves) and at sharing-service.ts:1763, where the driver comes from this.engine.getDriverForObject(object); IDataEngine declares that member. Drivers declare the list; none reads it.
  • "which the retired list's read of the table ran and the subquery would read around" — true. The retired list was read with engine.find('sys_record_share', …), so object-scoped middleware and find hooks registered for the table by name ran on it; the subquery is evaluated inside the driver and passes neither. The code's own refusal text states the general form ("which a read of the table runs").
  • Kept and still true: line 5's "SharedRecordIds today"; "At this step both answer with the refusal (R1)" (passFixedReadLeaves throws for both classes).

Tried to break it: looked for a surviving list path or cap in the share arm (none), a second writer of the leaf (none outside probes and testkits), a second reader of the declaration (none), an engine door call that does not admit the leaf (none), and stale future or present tense left in either file (today, until, lands, yet: only seam line 5, which is true).

  • N1 (nit) — the spec sentence names only the engine's callers as admitting the leaf; the analytics read-scope door also admits it (READ_SCOPE_FIXED_READ_LEAF_BRANDS, plan step 5). The sentence is true as written and was engine-only before this diff; accepted as it stands, no change asked.

Implemented-by: claude/issue-36121-shared-record-ids-docblock-tense
Reviewed-by: session_011y7As6YDLR8TJVDpdXzJyV

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

维护者速读

  • 结论:通过(ACCEPT)。两处已发布的代码注释改成切换后的说法:共享记录不再用“最多 5000 条 id 名单”,而是整组授权一次读出。纯注释,行为不变。
  • 契约审核已通过,CI 全绿。无需你做任何事。

席位核对

Verdict: ACCEPT · head d42859d0567775ea9f16cd5ab16fc76afc67a06e · card #36121 · L2 record: comment 7104042827 (PASS, CONTRACT_REVIEW_TIER, schema face; one nit accepted)

Reviewed against GitHub at this head (diff, card body, l1-face.mjs --pr 36723 exit 0, pr-state.mjs), not against the report.

Checklist

  • Shape: open, draft, base main, first line Fixes #36121; no closing keyword binds another card. Fixes is right: the card's Scope is the two named docblocks plus any grant-list docblock its own grep finds in packages/spec/src/data and packages/objectql/src; the diff covers both files and the grep on this head finds no remaining grant-list sentence there.
  • Scope: 4 files; every source hunk is inside a block comment (no export, schema or runtime line moves).
  • Changesets: two patch entries, one per package, as the card asks (a comment-only edit to a published src/** file still ships bytes). Sentences read against the diff: "no longer says the share arm binds a list of at most 5,000 granted ids today, nor that nothing writes the leaf yet" and "plugin-sharing writes it and reads driverEvaluatesFixedReadLeaf for R2" match the hunks; "No schema, export or runtime behaviour changes" holds.
  • Truth of the new sentences: judged in the L2 record against plugin-sharing's builders, share-arm-boot.ts, shareGrantsInertReason and the engine door.
  • Gates at this head: Lint & Repo Gates success, TypeScript Type Check success; all checks 58 success, 11 expected skip, 0 failed, 0 pending.

Out of scope, disposition

  • packages/plugins/plugin-sharing/src/share-arm-boot.ts:10 still says "today's grant read" (the dev's note, confirmed by the L2): dropped. It is an internal module comment outside the card's grep roots, with no user-visible cost, so it does not pass filing gate ①; whoever next edits that module can correct it in place.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7

Landing · 2026-11-23T14:51Z · head d42859d056 (unchanged since the ACCEPT) · verdict: L1-a ACCEPT 7104624675 · L2 PASS 7104042827 (CONTRACT_REVIEW_TIER, schema face), both on this head.

Probe Reading
check-governed-merges --pr 36723 NOT governed · 59 changed lines (+39 / −20) ≤ 3000
pr-state --pr 36723 58 success · 11 expected skip · 0 unexpected skip · 0 failed · 0 pending · mergeable_state clean
l1-face --pr 36723 CLEAN · dogfood not owed
narrowing leg the PR body and both changesets (.changeset/36121-fixed-read-leaf-seam-docblock-tense.md, .changeset/36121-shared-record-ids-docblock-tense.md, added, patch) declare Clause-②: no with no (narrowing) arm; no ! in the title
landing-k --pr 36723 K = 1 < 15

State change: ready for review, auto-merge armed. On MERGED, Fixes #36121 closes the card and pm:dispatched comes off.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 14:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit b7fe94a Nov 23, 2026
70 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36121-shared-record-ids-docblock-tense branch November 23, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec/objectql: the SharedRecordIds and seam docblocks still describe the share-grant list in the present tense after the switch

2 participants